package com.nciae.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author Guoliyu
 * @since 2022-03-30
 */
public class Rectification implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 整改内容
     */
    private String content;

    /**
     * 对应整改宿舍id
     */
    private Long dormitoryId;

    /**
     * 对应那次检查的整改
     */
    private Long securityQuestionId;

    /**
     * 逻辑删除
     */
    private Integer isDeleted;

    @TableField(exist = false)
    private String timeString;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    public Long getDormitoryId() {
        return dormitoryId;
    }

    public void setDormitoryId(Long dormitoryId) {
        this.dormitoryId = dormitoryId;
    }
    public Long getSecurityQuestionId() {
        return securityQuestionId;
    }

    public void setSecurityQuestionId(Long securityQuestionId) {
        this.securityQuestionId = securityQuestionId;
    }
    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getTimeString() {
        return timeString;
    }

    public void setTimeString(Date date) {
        DateFormat df = new SimpleDateFormat("yyyy年MM月dd日");
        this.timeString = df.format(date);
    }

    @Override
    public String toString() {
        return "Rectification{" +
                "id=" + id +
                ", content='" + content + '\'' +
                ", dormitoryId=" + dormitoryId +
                ", securityQuestionId=" + securityQuestionId +
                ", isDeleted=" + isDeleted +
                ", timeString='" + timeString + '\'' +
                '}';
    }
}
